package com.todofun.business.tuanke.bo;

import java.util.List;

import com.todofun.business.tuanke.vo.Lesson;
import com.todofun.common.app.BaseService;

public class LessonService extends BaseService{

	public void addLesson(Lesson lesson) {
		saveVo(lesson);
	}

	public void editLesson(Lesson lesson) {
		updateVo(lesson);
	}

	public List<Lesson> listAllLesson() {
		String hql = "from Lesson order by id desc";
		List<Lesson> allLesson = queryByHQL(hql);
		return allLesson;
		
	}

	public Lesson loadLesson(Long lessonId) {
		Lesson lesson = (Lesson)getVoByID(Lesson.class, lessonId);
		return lesson;
	}
	
	public void delLesson(Long lessonId) {
		Lesson lesson = (Lesson)getVoByID(Lesson.class,lessonId);
		delVo(lesson);
	}


}
